import request from '@/utils/request'

// 获取统计数据
export function getStatistics() {
  return request({
    url: '/api/dashboard/statistics',
    method: 'get'
  })
}

// 获取销售趋势
export function getSalesTrend(type) {
  return request({
    url: '/api/dashboard/sales-trend',
    method: 'get',
    params: { type }
  })
}

// 获取商品销量排行
export function getProductRank() {
  return request({
    url: '/api/dashboard/product-rank',
    method: 'get'
  })
}

// 获取区域运营数据
export function getAreaData() {
  return request({
    url: '/api/dashboard/area-data',
    method: 'get'
  })
}

// 导出区域数据
export function exportAreaData() {
  return request({
    url: '/api/dashboard/area-data/export',
    method: 'get',
    responseType: 'blob'
  })
} 